﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace Business.exception
{
    /// <summary>
    /// This class represents the main exception.
    /// </summary>
    [Serializable]
    public class WebSiteException : ApplicationException
    {
        /// <summary>
        /// Default Constructor.
        /// </summary>
        public WebSiteException()
            : base()
        {
        }

        /// <summary>
        /// Constructor holding the error message.
        /// </summary>
        /// <param name="msg">Error message</param>
        public WebSiteException(String msg)
            : base(msg)
        {
        }

        /// <summary>
        /// Constructor holding the error message and the thrown ineer exception.
        /// </summary>
        /// <param name="msg">Error message</param>
        /// <param name="innerExc">Thrown inner exception</param>
        public WebSiteException(String msg, System.Exception innerExc)
            : base(msg, innerExc)
        {
        }

        /// <summary>
        /// Constructor used when serialization is needed.
        /// </summary>
        /// <param name="info">Serialization information</param>
        /// <param name="context">Serialization Streaming Context</param>
        protected WebSiteException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }
    }

}

 

